package com.zlcx.tz.live.service.impl;

import com.zlcx.tz.live.constant.dic.SYS_EMAIL;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service;
import static com.zlcx.tz.live.constant.dic.SYS_EMAIL.complainmailgroup;
import static com.zlcx.tz.live.constant.dic.SYS_EMAIL.complainphones;

/**
 * <p></p>
 * <PRE>
 * <BR>    修改记录
 * <BR>-----------------------------------------------
 * <BR>    修改日期         修改人          修改内容
 * </PRE>
 *
 * @author zl
 * @version 1.0
 * @date Created in 2019/11/4 13:47
 * @copyright: Copyright (c) founders
 */
@Slf4j
@Service
public class SysConfService {


    @Value("${swagger.hostname}")
    private String hostname;

    @Autowired
    private RedisTemplate redisTemplate;

    @Value("${spring.profiles}")
    private String sysdev;

    @Autowired
    private DicServiceImpl dicService;


    public String getComplainMailGroup(){
        return dicService.findByCode(SYS_EMAIL.dicName()).filter(complainmailgroup.name()).getData();
    }

    public String getComplainPhones(){
        return dicService.findByCode(SYS_EMAIL.dicName()).filter(complainphones.name()).getData();
    }


    public String getSysEnv() {
        return sysdev;
    }





}
